use std::rc::Rc;
use crate::autograd::function::Function;
use crate::Tensor;

pub struct TensorCell<T> {
    pub data: Rc<Box<[T]>>,
    pub offset: usize,
    pub shape: Box<[usize]>, // TODO: move to stack
    pub strides: Box<[usize]>, // TODO: move to stack
    pub grad: Option<Tensor<T>>,
    pub grad_fn: Option<Box<dyn Function<T>>>,
    pub retains_grad: bool,
    pub requires_grad: bool,
}
